package com.mf.springcloud.service;

import com.mf.springcloud.entity.Article;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

//@FeignClient(value = "MICROSERVICECLOUD-PROVIDER")
@FeignClient(value = "MICROSERVICECLOUD-PROVIDER",fallbackFactory = ArticleClientServiceFallbackFactory.class)
public interface ArticleClientService {
    @RequestMapping(value="/article/get/{id}",method = RequestMethod.GET)
    public Article get(@PathVariable("id") Integer id);

    @RequestMapping(value="/article/add",method = RequestMethod.POST)
    public boolean add( Article article);

    @RequestMapping(value="/article/list",method = RequestMethod.GET)
    public List<Article> list();



}
